package com.example.spring;

import com.example.entity.Dog;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;

@SuppressWarnings("all")
public class SpringDemo03 {
    public static void main(String[] args) {
        ApplicationContext factory = new ClassPathXmlApplicationContext("applicationContext.xml");
        System.out.println("aaa");
        Dog dog = (Dog) factory.getBean("dog");
        dog.eat();
        System.out.println(dog);
        System.out.println(factory.getBean("dog"));
    }
}
